home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / pdsoft / demo_library / 4462.lha / xasteroids / README < prev    next >
Text File  |  1994-11-08  |  3KB  |  75 lines

  1.      Here is the source to Xasteroids, version 5, 9 Feb 93.
  2.  
  3.      This program runs under UNIX in the X-Windows or OpenWindows
  4. environment.  It could probably be modified for other operating systems
  5. without difficulty.  I compile it under quasi-BSD with this command:
  6.  
  7.     cc -I/util/X11/include -L/util/X11/lib xast.c -lm -lX11 -o xast.exe -O
  8.  
  9. That is, include files /util/X11/include, use the library in /util/X11/lib,
  10. source file ast.c, use the math and X11 libraries, object file will be ast.out,
  11. and Optimize.  The Makefile provided should do this for you if you type
  12.  
  13.     make xast.exe
  14.  
  15.      To run the program, type
  16.  
  17.     xasteroids &
  18.  
  19. This runs the shell script which runs the game and saves high scores.
  20. You should modify the first line of the shell script to move to the proper
  21. directory.
  22.  
  23.      Playing with scale of movement, object size, and window size can give you
  24. very different games.
  25.  
  26.      If you like the game, please send $5 to
  27.  
  28.     Phil Goetz
  29.     4023 Huckleberry Row
  30.     Ellicott City, MD 21043
  31.  
  32.      Even if you don't register, please send a note to my e-mail address
  33. so I know how many people use Xasteroids.
  34. Send any comments, suggestions, bug reports, modifications, etc., to
  35.  
  36.     goetz@cs.buffalo.EDU
  37.  
  38.      If you modify the game, feel free to post your version, PROVIDED that
  39. you retain my copyright notice, the credits, and note which version yours
  40. was derived from and its release date, what changes you made, and your
  41. release date.  I do not intend to release any more versions myself.
  42. I wash my hands of it.
  43.  
  44.      David Elliot (dce@sonyusa.sony.com) says that he had to put an
  45. XSync(disp) after the XDrawLines call or he would get protocol errors.
  46.  
  47.      On anything slower than a SPARCstation 1, or on any color screen,
  48. it will really drag.  There should be a way to set color screens to use
  49. a bitmap of depth 1, but I don't know how.  Please tell me if you do.
  50.      The code is not optimized because the XWindows
  51. calls take the vast majority of the time.  I tried, for instance,
  52. reading sines and cosines from a table instead of calculating them -
  53. it made no noticeable difference in speed.  Similarly, the collision
  54. detection could be optimized only to check objects nearby - but why
  55. bother.  Same goes for using registers, pointers to frequently-referenced
  56. array elements, etc.  It MIGHT make a significant difference in runtime
  57. if you replace the vector drawing with bitmaps.  It runs a LOT slower on
  58. color displays.
  59.      The vast majority of time seems to be used in erasing the pixmap
  60. each round, & there isn't much to do about that.  My tests have indicated
  61. that blanking individual asteroids rather than the whole screen would
  62. take comparable time, unless you had a complicated routine to optimize
  63. blanking.
  64.  
  65. By
  66.     Phil Goetz    <goetz@cs.buffalo.edu>
  67. Contributors:
  68.     Peter Phillips    <pphillip@cs.ubc.ca>
  69.     Pat Ryan    <pat@jaameri.gsfc.nasa.gov>
  70.     Craig Smith    <csmith@cscs.UUCP>
  71.     Doug Merritt    <doug@netcom.com>
  72.     James Berg    <berg@plains>        (makefile)
  73.     David Partain    <dlp@ida.liu.se>    (original man page)
  74.     Chris Moore    <moore@src.bae.co.uk>    (hi score script)
  75.